The magnetic field may form loops on the surface of the Sun. In these areas the emerging energy is partly blocked leading to a lower surface temperature. We can see these areas as sunspots. In close proximity to sunspots, the strength of the magnetic field may
multiply over 3,000 times. Sunspots are part of active regions where powerful flares and eruptions occur. The one million degrees (Celsius) hot, outermost layer of the Sun, the corona, expands outwards as the solar wind. The solar wind carries plasma through the solar system. Luckily our planet and life on it is protected by its atmosphere (especially the ozone layer) and by the magnetosphere. However high energetic particles from solar storms can enter to the upper atmosphere near the poles.
Spaghetti-like tangles of magnetic field lines, rising from the Sun's surface, release the energy that heats the Sun's atmosphere to more than a million degrees.